package com.warmheart.core.enums;

import java.util.HashMap;
import java.util.Map;

public class EnumsFromDictBase {

    /** Cookie类型: 01---用户SESSION信息 02---图片验证码 03---短信验证码 2020-09-13 ZJY */
    public enum COOKIE_TYPE {
        TYPE_01("01", "用户SESSION信息"), TYPE_02("02", "图片验证码"), TYPE_03("03", "短信验证码"), TYPE_04("04", "图形验证码token");

        private static final Map<String, COOKIE_TYPE> map = new HashMap<String, COOKIE_TYPE>();

        static {
            for (COOKIE_TYPE obj : COOKIE_TYPE.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private COOKIE_TYPE(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static COOKIE_TYPE fromString(String valueStr, COOKIE_TYPE... defaultEnum) {
            COOKIE_TYPE obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 菜单级别: 01---一级菜单 02---二级菜单 03---三级菜单 2020-09-13 ZJY */
    public enum MENU_GRADE {
        TYPE_01("01", "一级菜单"), TYPE_02("02", "二级菜单"), TYPE_03("03", "三级菜单");

        private static final Map<String, MENU_GRADE> map = new HashMap<String, MENU_GRADE>();

        static {
            for (MENU_GRADE obj : MENU_GRADE.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private MENU_GRADE(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static MENU_GRADE fromString(String valueStr, MENU_GRADE... defaultEnum) {
            MENU_GRADE obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 菜单类型: 01---管理后台菜单 02---APP菜单 2020-09-13 ZJY */
    public enum MENU_TYPE {
        TYPE_01("01", "管理后台菜单"), TYPE_02("02", "APP菜单");

        private static final Map<String, MENU_TYPE> map = new HashMap<String, MENU_TYPE>();

        static {
            for (MENU_TYPE obj : MENU_TYPE.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private MENU_TYPE(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static MENU_TYPE fromString(String valueStr, MENU_TYPE... defaultEnum) {
            MENU_TYPE obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 分页数据: 10---10 20---20 30---30 40---40 50---50 2020-09-13 ZJY */
    public enum PAGE_NUM {
        TYPE_10("10", "10"), TYPE_20("20", "20"), TYPE_30("30", "30"), TYPE_40("40", "40"), TYPE_50("50", "50");

        private static final Map<String, PAGE_NUM> map = new HashMap<String, PAGE_NUM>();

        static {
            for (PAGE_NUM obj : PAGE_NUM.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private PAGE_NUM(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static PAGE_NUM fromString(String valueStr, PAGE_NUM... defaultEnum) {
            PAGE_NUM obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 性别: 01---男 02---女 03---未知 2020-09-13 ZJY */
    public enum SEX_TYPE {
        TYPE_01("01", "男"), TYPE_02("02", "女"), TYPE_03("03", "未知");

        private static final Map<String, SEX_TYPE> map = new HashMap<String, SEX_TYPE>();

        static {
            for (SEX_TYPE obj : SEX_TYPE.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private SEX_TYPE(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static SEX_TYPE fromString(String valueStr, SEX_TYPE... defaultEnum) {
            SEX_TYPE obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 用户类型: 01---系统人员 02---应用人员 */
    public enum LOGIN_USER_CATEGORY {
        TYPE_01("01", "系统人员"), TYPE_02("02", "应用人员"), TYPE_03("03", "主体");

        private static final Map<String, LOGIN_USER_CATEGORY> map = new HashMap<String, LOGIN_USER_CATEGORY>();

        static {
            for (LOGIN_USER_CATEGORY obj : LOGIN_USER_CATEGORY.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private LOGIN_USER_CATEGORY(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static LOGIN_USER_CATEGORY fromString(String valueStr, LOGIN_USER_CATEGORY... defaultEnum) {
            LOGIN_USER_CATEGORY obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 通用布尔类型: 01---是 02---否 2020-09-13 ZJY */
    public enum YES_OR_NO {
        TYPE_YES("01", "是"), TYPE_NO("02", "否");

        private static final Map<String, YES_OR_NO> map = new HashMap<String, YES_OR_NO>();

        static {
            for (YES_OR_NO obj : YES_OR_NO.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private YES_OR_NO(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static YES_OR_NO fromString(String valueStr, YES_OR_NO... defaultEnum) {
            YES_OR_NO obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 启用状态: 01---启用 02---禁用 2020-09-13 ZJY */
    public enum ENABLE_STATUS {
        STATUS_01("01", "启用"), STATUS_02("02", "禁用");

        private static final Map<String, ENABLE_STATUS> map = new HashMap<String, ENABLE_STATUS>();

        static {
            for (ENABLE_STATUS obj : ENABLE_STATUS.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private ENABLE_STATUS(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static ENABLE_STATUS fromString(String valueStr, ENABLE_STATUS... defaultEnum) {
            ENABLE_STATUS obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 角色级别: 01---运维 02---超管 03---普通 2020-09-13 ZJY */
    public enum ROLE_LEVEL {
        TYPE_01("01", "运维"), TYPE_02("02", "超管"), TYPE_03("03", "普通");

        private static final Map<String, ROLE_LEVEL> map = new HashMap<String, ROLE_LEVEL>();

        static {
            for (ROLE_LEVEL obj : ROLE_LEVEL.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private ROLE_LEVEL(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static ROLE_LEVEL fromString(String valueStr, ROLE_LEVEL... defaultEnum) {
            ROLE_LEVEL obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 共通状态: 01---启用 02---禁用 2020-09-13 ZJY */
    public enum COMMON_STATUS {
        STATUS_ENABLE("01", "启用"), STATUS_DISABLE("02", "禁用");

        private static final Map<String, COMMON_STATUS> map = new HashMap<String, COMMON_STATUS>();

        static {
            for (COMMON_STATUS obj : COMMON_STATUS.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private COMMON_STATUS(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static COMMON_STATUS fromString(String valueStr, COMMON_STATUS... defaultEnum) {
            COMMON_STATUS obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 菜单类型: 01---目录 02---页面 2020-09-13 ZJY */
    public enum DIR_OR_PAGE {
        TYPE_01("01", "目录"), TYPE_02("02", "页面");

        private static final Map<String, DIR_OR_PAGE> map = new HashMap<String, DIR_OR_PAGE>();

        static {
            for (DIR_OR_PAGE obj : DIR_OR_PAGE.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private DIR_OR_PAGE(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static DIR_OR_PAGE fromString(String valueStr, DIR_OR_PAGE... defaultEnum) {
            DIR_OR_PAGE obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 是否显示: 01---显示 02---不显示 2020-09-13 ZJY */
    public enum IS_SHOW {
        TYPE_01("01", "显示"), TYPE_02("02", "不显示");

        private static final Map<String, IS_SHOW> map = new HashMap<String, IS_SHOW>();

        static {
            for (IS_SHOW obj : IS_SHOW.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private IS_SHOW(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static IS_SHOW fromString(String valueStr, IS_SHOW... defaultEnum) {
            IS_SHOW obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 用户登录类型: 01---后台 02---APP 2020-09-13 ZJY */
    public enum LOGIN_TYPE {
        TYPE_01("01", "后台"), TYPE_02("02", "APP");

        private static final Map<String, LOGIN_TYPE> map = new HashMap<String, LOGIN_TYPE>();

        static {
            for (LOGIN_TYPE obj : LOGIN_TYPE.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private LOGIN_TYPE(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static LOGIN_TYPE fromString(String valueStr, LOGIN_TYPE... defaultEnum) {
            LOGIN_TYPE obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 用户类型: 01---运维 02---应用 */
    public enum USER_TYPE {
        TYPE_PLAT("01", "运维"), TYPE_APP("02", "应用"), TYPE_SUBJECT("03", "主体");

        private static final Map<String, USER_TYPE> map = new HashMap<String, USER_TYPE>();

        static {
            for (USER_TYPE obj : USER_TYPE.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private USER_TYPE(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static USER_TYPE fromString(String valueStr, USER_TYPE... defaultEnum) {
            USER_TYPE obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 返回消息 */
    public enum RET_MSG {
        TYPE_SYS_BUSY("-1", "系统繁忙，请稍后重试"),
        TYPE_SUCCESS("0", "SUCCESS"),
        TYPE_SIGN_ERROR("4001", "签名错误"),
        TYPE_TOKEN_ERROR("4002", "TOKEN错误"),
        TYPE_PARAM_ILLEGAL("4003", "参数不合法"),
        TYPE_PARAM_ERROR("4004", "参数错误"),
        TYPE_SYS_ERROR("500", "系统错误");

        private static final Map<String, RET_MSG> map = new HashMap<String, RET_MSG>();

        static {
            for (RET_MSG obj : RET_MSG.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private RET_MSG(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static RET_MSG fromString(String valueStr, RET_MSG... defaultEnum) {
            RET_MSG obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 删除状态 */
    public enum DEL_FLAG {
        STATUS_01("01", "正常"), STATUS_02("02", "已删除");

        private static final Map<String, DEL_FLAG> map = new HashMap<String, DEL_FLAG>();

        static {
            for (DEL_FLAG obj : DEL_FLAG.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private DEL_FLAG(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static DEL_FLAG fromString(String valueStr, DEL_FLAG... defaultEnum) {
            DEL_FLAG obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 序号类型 */
    public enum SEQ_TYPE {
        TYPE_APP("APP", "应用"),
        TYPE_SCENE("SCENE", "场景"),
        TYPE_CHANNEL("CHANNEL", "渠道"),
        TYPE_SUBJECT("SUBJECT", "主体"),
        TYPE_ACCOUNT("ACCOUNT", "主体子账号"),
        TYPE_ORDER("ORDER", "订单"),
        TYPE_SUB_ORDER("SUB_ORDER", "子订单"),
        TYPE_PROJECT_TYPE("PROJECT_TYPE", "项目类型"),
        TYPE_PROJECT("PROJECT", "项目"),
        TYPE_ITEM("ITEM", "细分项目"),
        TYPE_SPLIT("SPLIT", "分账规则"),
        TYPE_CURRENCY("CURRENCY", "货币"),
        TYPE_TRADE("TRADE", "钱包交易记录");

        private static final Map<String, SEQ_TYPE> map = new HashMap<String, SEQ_TYPE>();

        static {
            for (SEQ_TYPE obj : SEQ_TYPE.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private SEQ_TYPE(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static SEQ_TYPE fromString(String valueStr, SEQ_TYPE... defaultEnum) {
            SEQ_TYPE obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 分账细则状态: 01---生效中 02---待生效 */
    public enum RULE_STATUS {
        STATUS_EFFECTIVE("01", "生效中"), STATUS_WAIT("02", "待生效");

        private static final Map<String, RULE_STATUS> map = new HashMap<String, RULE_STATUS>();

        static {
            for (RULE_STATUS obj : RULE_STATUS.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private RULE_STATUS(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static RULE_STATUS fromString(String valueStr, RULE_STATUS... defaultEnum) {
            RULE_STATUS obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 分账类型: 01---按比例 02---按固定金额 */
    public enum SPLIT_TYPE {
        TYPE_RATE("01", "按比例"), TYPE_LIMIT_AMOUNT("02", "按固定金额");

        private static final Map<String, SPLIT_TYPE> map = new HashMap<String, SPLIT_TYPE>();

        static {
            for (SPLIT_TYPE obj : SPLIT_TYPE.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private SPLIT_TYPE(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static SPLIT_TYPE fromString(String valueStr, SPLIT_TYPE... defaultEnum) {
            SPLIT_TYPE obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 主体类型: 01---企业 02---个人 */
    public enum SUBJECT_TYPE {
        TYPE_COMPANY("01", "企业"), TYPE_PERSON("02", "个人");

        private static final Map<String, SUBJECT_TYPE> map = new HashMap<String, SUBJECT_TYPE>();

        static {
            for (SUBJECT_TYPE obj : SUBJECT_TYPE.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private SUBJECT_TYPE(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static SUBJECT_TYPE fromString(String valueStr, SUBJECT_TYPE... defaultEnum) {
            SUBJECT_TYPE obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 订单类型 */
    public enum ORDER_TYPE {
        TYPE_RECHARGE("01", "入金"), TYPE_REFUND("02", "退款"), TYPE_TRANSFER("03", "转账"), TYPE_WITHDRAW("04", "出金");

        private static final Map<String, ORDER_TYPE> map = new HashMap<String, ORDER_TYPE>();

        static {
            for (ORDER_TYPE obj : ORDER_TYPE.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private ORDER_TYPE(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static ORDER_TYPE fromString(String valueStr, ORDER_TYPE... defaultEnum) {
            ORDER_TYPE obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 子订单类型 */
    public enum ORDER_SUB_TYPE {
        TYPE_RECHARGE("11", "入金"),
        TYPE_REFUND_IN("21", "退款入金"),
        TYPE_REFUND_OUT("22", "退款出金"),
        TYPE_TRANSFER_IN("31", "转账入金"),
        TYPE_TRANSFER_OUT("32", "转账出金"),
        TYPE_WITHDRAW("41", "出金");

        private static final Map<String, ORDER_SUB_TYPE> map = new HashMap<String, ORDER_SUB_TYPE>();

        static {
            for (ORDER_SUB_TYPE obj : ORDER_SUB_TYPE.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private ORDER_SUB_TYPE(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static ORDER_SUB_TYPE fromString(String valueStr, ORDER_SUB_TYPE... defaultEnum) {
            ORDER_SUB_TYPE obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 订单状态 */
    public enum ORDER_STATUS {
        STATUS_WAIT("01", "处理中"), STATUS_SUCCESS("02", "成功"), STATUS_FAIL("03", "失败"), STATUS_FAULT("04", "异常");

        private static final Map<String, ORDER_STATUS> map = new HashMap<String, ORDER_STATUS>();

        static {
            for (ORDER_STATUS obj : ORDER_STATUS.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private ORDER_STATUS(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static ORDER_STATUS fromString(String valueStr, ORDER_STATUS... defaultEnum) {
            ORDER_STATUS obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 提现类型 */
    public enum OUT_TYPE {
        TYPE_ACCOUNT("01", "台账"), TYPE_UNIONPAY("02", "银联");

        private static final Map<String, OUT_TYPE> map = new HashMap<String, OUT_TYPE>();

        static {
            for (OUT_TYPE obj : OUT_TYPE.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private OUT_TYPE(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static OUT_TYPE fromString(String valueStr, OUT_TYPE... defaultEnum) {
            OUT_TYPE obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 结算类型 */
    public enum SETTLEMENT_TYPE {
        TYPE_NOW("01", "立即结算"), TYPE_FIXED("02", "固定日期");

        private static final Map<String, SETTLEMENT_TYPE> map = new HashMap<String, SETTLEMENT_TYPE>();

        static {
            for (SETTLEMENT_TYPE obj : SETTLEMENT_TYPE.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private SETTLEMENT_TYPE(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static SETTLEMENT_TYPE fromString(String valueStr, SETTLEMENT_TYPE... defaultEnum) {
            SETTLEMENT_TYPE obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 设置项类型 */
    public enum CONFIG_TYPE {
        TYPE_WITHDRAW("WITHDRAW", "提现比率"), TYPE_FROZEN("FROZEN", "冻结比率"), TYPE_MYCHAIN("MYCHAIN", "蚂蚁链");

        private static final Map<String, CONFIG_TYPE> map = new HashMap<String, CONFIG_TYPE>();

        static {
            for (CONFIG_TYPE obj : CONFIG_TYPE.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private CONFIG_TYPE(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static CONFIG_TYPE fromString(String valueStr, CONFIG_TYPE... defaultEnum) {
            CONFIG_TYPE obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }

    /** 钱包记录类型 */
    public enum TRADE_TYPE {
        TYPE_RECHARGE("11", "入金"),
        TYPE_REFUND("21", "退款"),
        TYPE_TRANSFER_IN("31", "转账入金"),
        TYPE_TRANSFER_OUT("32", "转账出金"),
        TYPE_WITHDRAW("41", "出金"),
        TYPE_FROZEN("51", "冻结"),
        TYPE_UNFREEZE("52", "解冻");

        private static final Map<String, TRADE_TYPE> map = new HashMap<String, TRADE_TYPE>();

        static {
            for (TRADE_TYPE obj : TRADE_TYPE.values()) {
                map.put(obj.value, obj);
            }
        }

        // 枚举值
        private String value;

        // 描述
        private String desc;

        private TRADE_TYPE(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public static TRADE_TYPE fromString(String valueStr, TRADE_TYPE... defaultEnum) {
            TRADE_TYPE obj = map.get(valueStr);
            if (obj == null && defaultEnum != null && defaultEnum.length > 0)
                return defaultEnum[0];
            return obj;
        }

        public String getValue() {
            return value;
        }

        public String getDesc() {
            return desc;
        }
    }
}
